package com.ruoyi.user.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 小程序用户管理业务对象 tb_user
 *
 * @author wuchao
 * @date 2022-03-03
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("小程序用户管理业务对象")
public class UserBo extends BaseEntity {

    /**
     *
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "手机号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mobile;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称", required = true)
    @NotBlank(message = "昵称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nickname;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像", required = true)
    @NotBlank(message = "头像不能为空", groups = { AddGroup.class, EditGroup.class })
    private String headPhoto;

    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄", required = true)
    @NotNull(message = "年龄不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long age;

    /**
     * 性别
* 0：未知、
* 1：男、
* 2：女
     */
    @ApiModelProperty(value = "性别 * 0：未知、 * 1：男、 * 2：女", required = true)
    @NotNull(message = "性别 * 0：未知、 * 1：男、 * 2：女不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer gender;

    /**
     * 真实姓名
     */
    @ApiModelProperty(value = "真实姓名", required = true)
    @NotBlank(message = "真实姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String realName;

    /**
     * 生日
     */
    @ApiModelProperty(value = "生日", required = true)
    @NotBlank(message = "生日不能为空", groups = { AddGroup.class, EditGroup.class })
    private String birthday;

    /**
     * 状态（0：禁用，1：启用）
     */
    @ApiModelProperty(value = "状态（0：禁用，1：启用）", required = true)
    @NotNull(message = "状态（0：禁用，1：启用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean status;

    /**
     * 最后一次登录时间
     */
    @ApiModelProperty(value = "最后一次登录时间", required = true)
    @NotNull(message = "最后一次登录时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date lastLoginTime;


}
